# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=podman-compose
pkgver=1.2.0
pkgrel=0
pkgdesc="Script to run docker-compose.yml using podman"
url="https://github.com/containers/podman-compose"
# s390x: podman (netavark & aardvark-dns -> nix crate)
arch="noarch !s390x"
license="GPL-2.0-or-later"
options="!check" # Requires running docker env
depends="podman py3-dotenv py3-yaml"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-bash-completion $pkgname-doc $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/containers/podman-compose/archive/v$pkgver.tar.gz"

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl

	install -Dm644 completion/bash/"$pkgname" \
		"$pkgdir"/usr/share/bash-completion/completions/"$pkgname"

	install -Dm644 docs/* -t "$pkgdir"/usr/share/doc/"$pkgname"
	mv examples "$pkgdir"/usr/share/doc/"$pkgname"/
}

sha512sums="
2b45bcb331e334d362a0906563377e1514aca95f50c575e4b53039e58394b39af1ceeb606d90c652ef6d8cc5e8764a27edf11fc9782a89b186812a474b583579  podman-compose-1.2.0.tar.gz
"
